<template>
  <div>
    <h2>从业资格证信息</h2>
    <h5>
      查询指定数据：<input type="text" v-model="searchCondition" placeholder="请输入查询Xxx">
      <el-button type="primary" @click="selectcondition">点击查询</el-button>
    </h5>

    <el-table :data="occupationalrequirementsList" style="width: 100%" border empty-text="暂无数据" >

      <el-table-column prop="APPNO" label="申请号" width="180" />

      <el-table-column prop="APPROVE" label="审批" width="180" />

      <el-table-column prop="BUSINESSAREA" label="业务区域" width="180" />

      <el-table-column label="操作">
        <template #default="scope">
          <el-button type="success" @click="test(scope.row)">查看详细</el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-dialog v-model="dialogVisible" title="详细信息" width="30%">
      <div style="text-align: left">
        申请号：{{Occupationalrequirements.APPNO}}
        <br/>
        审批：{{Occupationalrequirements.APPROVE}}
        <br/>
        业务区域：{{Occupationalrequirements.BUSINESSAREA}}
        <br/>
        卡开始日期：{{Occupationalrequirements.CARDBEGINDATE}}
        <br/>
        卡结束日期：{{Occupationalrequirements.CARDENDDATE}}
        <br/>
        证件ID：{{Occupationalrequirements.CERTID}}
        <br/>
        证件类型：{{Occupationalrequirements.CERTTYPE}}
        <br/>
        员工地址：{{Occupationalrequirements.EMPLADDR}}
        <br/>
        员工名称：{{Occupationalrequirements.EMPLNAME}}
        <br/>
        员工ID：{{Occupationalrequirements.EMPLOYEEID}}
        <br/>
        员工编号：{{Occupationalrequirements.EMPLOYEENO}}
        <br/>
        是否标记：{{Occupationalrequirements.ISFLAG}}
        <br/>
        是否锁定：{{Occupationalrequirements.ISLOCK}}
        <br/>
        颁发日期：{{Occupationalrequirements.LSSUDATE}}
        <br/>
        颁发单位名称：{{Occupationalrequirements.LSSUUNITNAME}}
        <br/>
        操作时间：{{Occupationalrequirements.OPERATETIME}}
        <br/>
        操作单位：{{Occupationalrequirements.OPERATEUNIT}}
        <br/>
        操作人：{{Occupationalrequirements.OPERATOR}}
        <br/>
        过程状态：{{Occupationalrequirements.PROCSTATUS}}
        <br/>
        关联模型：{{Occupationalrequirements.RELIGIONMODELS}}
        <br/>
        万源村业务区域：{{Occupationalrequirements.WYCBUSINESSAREA}}
        <br/>
        <el-button  @click="addOne(Occupationalrequirements)">
          点击添加
        </el-button>
      </div>
    </el-dialog>


  </div>
</template>

<script>
import axios from "axios";
import {ElMessage} from "element-plus";

export default {
  name: "OccupationalrequirementsView",
  data(){
    return {
      occupationalrequirementsList:[],
      dialogVisible:false,
      Occupationalrequirements:{},
      searchCondition:"",
    }
  },created() {
    axios("http://localhost:8000/consumerselect/occupationalrequirements").then(
        (res)=>{
          this.occupationalrequirementsList = res.data;
          ElMessage.info("数据查询完成")
        }
    )
  },methods:{
    test(row){
      this.householdinformation = row;
      this.dialogVisible = true;
    },
    selectcondition(){
      axios(`http://localhost:8000/consumerselect/occupationalrequirements?app_no=${this.searchCondition}`).then(
          (res)=>{
            this.occupationalrequirementsList = res.data
            ElMessage.info("条件查询完成")
          }
      )
    },
    addOne(row){
      alert("添加功能还未开放")
    }
  }
}
</script>

<style scoped>

</style>